﻿using System;
using System.IO;
using System.Windows.Forms;
using CONEK911Manager.DTO;

namespace CONEK911Manager
{
    public partial class FormManager : Form
    {
        public FormManager()
        {
            InitializeComponent();
            LoadImage();
        }

        private void BtnProductsManagerClick(object sender, EventArgs e)
        {
            var formProductsManager = new FormProductsManager();
            formProductsManager.ShowDialog();
        }

        private void BtnMembersManagerClick(object sender, EventArgs e)
        {
            var formMemberManager = new FormMembersManager();
            formMemberManager.ShowDialog();
        }

        private void LoadImage()
        {
            btnProductsManager.Image = Base64String.ToImage(Base64String.ProductManager);
            btnMembersManager.Image = Base64String.ToImage(Base64String.MemberManager);
            btnOrderManager.Image = Base64String.ToImage(Base64String.OrderManager);
            btnPoundage.Image = Base64String.ToImage(Base64String.Poundage);
            btnConfig.Image = Base64String.ToImage(Base64String.Config);
        }

        private void BtnConfigClick(object sender, EventArgs e)
        {
            var formConfig = new FormConfig();
            formConfig.ShowDialog();
        }
    }
}
